package com.fulan.controller;

import com.fulan.feign.StockFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author lvxingli
 * @Date 2021-10-24 15:46
 **/
@RestController
@RefreshScope
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private StockFeignService feignService;
    @GetMapping("/orderTest")
    public String orderTest(String info){
        return feignService.test(info);
    }
    @Value("${user.name}")
    private String username;
    @GetMapping("/hello")
    public String sayHello(){
        return username;
    }

}
